<template>
  <div>
    <el-card>
      <!-- 面包屑导航区 -->
     <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">Music</el-breadcrumb-item>
      <el-breadcrumb-item>权限管理</el-breadcrumb-item>
      <el-breadcrumb-item>权限列表</el-breadcrumb-item>
    </el-breadcrumb>

    <el-table border
    :data="tableData"
    stripe
    style="width: 100%">
    <el-table-column 
      
     type="index"
      width="80">
    </el-table-column>
    <el-table-column
      prop="authName"
      label="权限名称"
      width="480">
    </el-table-column>
    <el-table-column
      prop="path"
      label="路径"
      width="480">
    </el-table-column>
    <el-table-column
      
      label="权限等级">
      <template #default="{row}"> <el-tag v-if="row.level==0">一级权限</el-tag>
         <el-tag type="success" v-else-if="row.level==1">二级权限</el-tag>
         <el-tag type="warning" v-else>三级权限</el-tag>
        </template>
    </el-table-column>
  </el-table>
    </el-card>
  </div>
</template>

<script>

import {getqxlist} from '@/api/user'
export default {
  methods: {
    async getlist() {
      let res = await getqxlist()
      console.log(res);
      this.tableData=  res.data
    }
  },
  created() {
   this.getlist()
    
  },
  data() {
  
  return {
    tableData: []
  }
},
}
</script>

<style>

</style>